package cn.kgc.springcloud.controller;

import cn.kgc.springcloud.service.StudentService;
import cn.kgc.springcloud.vo.StudentVO;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author 课工场
 * @date 2023/10/19
 * @description
 */
@RestController
@RequestMapping("student")
public class StudentController {

    @Resource
    private StudentService studentService;

    @GetMapping
    public List<StudentVO>  getList(){

        return   studentService.getList();
    }


    @PostMapping
    public StudentVO  addStudent(@RequestBody StudentVO studentVO){

       return    studentService.addStudent(studentVO);

    }
}
